import * as actionTypes from './constants';

const defaultstate = {
    
    searchResult:{},
    songUrl:[],
    singerDetail:{},
    songDetail:{},
    songLyric:{}
    
}

const reducer = (state = defaultstate, action) => {
    
    switch (action.type) {
      
        case actionTypes.GET_SEARCHALL:
            return {...state,searchResult:action.data.result}
        case actionTypes.GET_SONGURL:
                // console.log('okkk');
            return {...state,songUrl:action.data}
        case actionTypes.GET_SINGERDETAIL:
                // console.log('okkk');
            return {...state,singerDetail:action.data}
        case actionTypes.GET_SONGDETAIL:
                // console.log('okkk');
        return {...state,songDetail:action.data}
        case actionTypes.GET_SONGLYRIC:
                // console.log('okkk');
        return {...state,songLyric:action.data}
        
        default:
            return state;
    }
    
}
export default reducer;